package com.pulyka.rtpvp.engine.client.web.ui.client;

import com.google.gwt.canvas.client.Canvas;
import com.google.gwt.event.logical.shared.ResizeEvent;
import com.google.gwt.event.logical.shared.ResizeHandler;
import com.google.gwt.user.client.ui.AbsolutePanel;
import com.google.gwt.user.client.ui.Composite;

public class Viewport extends Composite implements ResizeHandler{

	protected int clientWidth;
	protected int clientHeight;
	
	protected AbsolutePanel mainPanel;
	protected Canvas heroLayer;
	protected Canvas missileLayer;
	
	
	public Viewport() {
		
	}

	public void setClientSize(int width, int height){
		this.clientHeight = height;
		this.clientWidth = width;
		mainPanel.setPixelSize(width, height);
		heroLayer.setPixelSize(width, height);
		missileLayer.setPixelSize(width, height);
	}
	



	@Override
	public void onResize(ResizeEvent event) {
		// TODO Auto-generated method stub
		
	}

}
